Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSV fixes #1107

Merged
merged 4 commits into from
Sep 4, 2024
Merged

CSV fixes #1107

merged 4 commits into from
Sep 4, 2024

Conversation

kk7ds
Copy link
Owner

@kk7ds kk7ds commented Sep 4, 2024

  • csv: Allow quoted header names
  • csv: Fall back to GenericCSV for csv files with no match
  • csv: Report unknown header fields
  • Improve "driver messages" dialog

Some software that spits out CSV may just quote everything, even when
not needed. Doing that prevents us from recognizing the header and
thus makes us think a file isn't in a known format.

Fixes: #11519
If we fail to find a matching driver and the file appears to be a
".csv" file, return GenericCSV as a match. This will make us try to
open the file with the generic driver and thus capture loading error
messages and show them to the user. Otherwise we would just fail to
match a driver, and report the format is unsupported, which is
confusing to a user.

Related to #11519
In order to help make more sense of why a CSV file isn't open-able,
we should log any headers we don't recognize so the user will see
them. Note that the test csv file in tests/images is from a billion
years ago, when we apparently had bank info as a column. With this,
the test that asserts we load CSV files with no errors fails on our
own sample file (!).

Related to #11519
Jamming a hundred errors into a MessageBox is not scalable and looks
pretty dumb after a few. This makes it into a proper dialog that
shows the first line of each and lets the user select each for better
readability.

Related to #11519
@kk7ds kk7ds merged commit 355c0c5 into master Sep 4, 2024
6 checks passed
@kk7ds kk7ds deleted the bug/11519/csvformat branch September 4, 2024 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant